package com.dalin.platform.pub;

import com.dalin.framework.dao.DbDao;
import com.dalin.framework.listeners.SpringContext;
import com.dalin.platform.loa.service.DicService;
import com.dalin.platform.loa.service.LoaService;
import com.dalin.platform.loa.service.WsSecurityService;

/*****************************************************************************
 * @content: 获得spring bean                                                 *
 * @author : 那建林                                                          *
 * @crtDate: 2010-04-26                                                     *
 * @version: 1.1                                                            *
 ****************************************************************************/
public final class PlatContext extends SpringContext {
	// 获得dao spring bean
	public static synchronized DbDao getDao() {
		return (DbDao) getApplicationContext().getBean("dao");
	}
	
	public static synchronized DicService getDicService() {
		return (DicService) getApplicationContext().getBean("dicService");
	}
	
	public static synchronized LoaService getLoaService() {
		return (LoaService) getApplicationContext().getBean("loaService");
	}
	
	public static synchronized WsSecurityService getWsSecurityService() {
		return (WsSecurityService) getApplicationContext().getBean("wsSecurityService");
	}
	
	public static synchronized Object getBean(String id) {
		return getApplicationContext().getBean(id);
	}
}
